const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username,
  staffPhoto: state => state.user.userInfo.staffPhoto,
  companyName: state => state.user.userInfo.companyName,
  departmentName: state => state.user.userInfo.departmentName,
  points: state => {
    // 退出后由于清空了userInfo  .roles是undefined   undefined.points报错
    if (state.user.userInfo.roles) {
      return state.user.userInfo.roles.points
    }
  }
}
export default getters
